package com.xigua.JucOfBeautiful.chapterSix._6_1;

import java.util.concurrent.locks.LockSupport;

/**
 * @author LiRongHua
 * @Title: ${file_name}
 * @Package ${package_name}
 * @Description: ${todo}
 * @date 2022/2/216:37
 */
public class LockSupportTest {
    public static void main(String[] args) throws InterruptedException {

        Thread thread = new Thread(()->{
            System.out.println("aaaaaaaaaaaa");
            try {
                Thread.sleep(2000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            LockSupport.park();
            System.out.println("bbbbbbbbb");
        });
        LockSupport.unpark(thread);
        thread.start();




    }
}
